# available options are:
# - msitranslate=0|1
# per-device overriden of pci_msitranslate, see below
+# - power_mgmt=0|1
+# per-device overriden of pci_power_mgmt, see below
#
#pci=[ '07:00.0', '07:00.1' ]
#
#pci_msitranslate=1
+# PCI Power Management:
+#
+# If it's set, the guest OS will be able to program D0-D3hot states of the
+# PCI device for the purpose of low power consumption.
+#
+#pci_power_mgmt=0
+
#-----------------------------------------------------------------------------
# Configure PVSCSI devices:
#
backend driver domain to use for the disk.
The option may be repeated to add more than one disk.""")
-gopts.var('pci', val='BUS:DEV.FUNC[,msitranslate=0|1]',
+gopts.var('pci', val='BUS:DEV.FUNC[,msitranslate=0|1][,power_mgmt=0|1]',
fn=append_value, default=[],
use="""Add a PCI device to a domain, using given params (in hex).
For example 'pci=c0:02.1'.
If msitranslate is set, MSI-INTx translation is enabled if possible.
Guest that doesn't support MSI will get IO-APIC type IRQs
translated from physical MSI, HVM only. Default is 1.
- The option may be repeated to add more than one pci device.""")
+ The option may be repeated to add more than one pci device.
+ If power_mgmt is set, the guest OS will be able to program the power
+ states D0-D3hot of the device, HVM only. Default=0.""")
gopts.var('vscsi', val='PDEV,VDEV[,DOM]',
fn=append_value, default=[],
use="""Global PCI MSI-INTx translation flag (0=disable;
1=enable.""")
+gopts.var('pci_power_mgmt', val='POWERMGMT',
+ fn=set_int, default=0,
+ use="""Global PCI Power Management flag (0=disable;1=enable).""")
+
def err(msg):
"""Print an error to stderr and exit.
"""
d = comma_sep_kv_to_dict(opts)
def f(k):
- if k not in ['msitranslate']:
+ if k not in ['msitranslate', 'power_mgmt']:
err('Invalid pci option: ' + k)
config_pci_opts.append([k, d[k]])
'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet',
'guest_os_type', 'hap', 'opengl', 'cpuid', 'cpuid_check',
'viridian', 'xen_extended_power_mgmt', 'pci_msitranslate',
- 'vpt_align' ]
+ 'vpt_align', 'pci_power_mgmt' ]
for a in args:
if a in vals.__dict__ and vals.__dict__[a] is not None: